<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
  * {
    margin: 0;
    padding: 0;
  }
  .container {
    border: 2px solid #000;
    padding: 10px;
  }
  .float-left {
    float: left; /*Formating context*/
    width: 150px;
    height: 100px;
    background-color: lightblue;
    margin: 10px;
  }
  .margin-box {
    width: 200px;
    height: 100px;
    background-color: lightgreen;
    margin: 20px 0 20px 50px;
  }
  </style>
</head>
<body>
  <div class="container">
    <div class="float-left">这是一个左浮动的元素</div>
    <div class="margin-box">这是有左侧外边距的盒子</div>
  </div>
</body>
</html>